<template>
    <el-table :data="props.list" style="width: 100%" size="large" :height="props.height" border :fit="true" row-class-name="row_name"  :header-cell-style="{
            textAlign: 'center',
            height: '42px',
			background: '#e9f2fa',
        }">
        <el-table-column fixed prop="id" label="用户id" align="center"/>
        <el-table-column prop="nickname" label="微信昵称"   align="center"/>
        <el-table-column prop="number" label="微信号"  align="center"/>
        <el-table-column prop="mobile" label="手机号"   align="center"/>
        <el-table-column prop="public_num_sum" label="发布信息"  align="center"/>
        <el-table-column prop="public_pay_money" label="消费"   align="center"/>
        <el-table-column  label="信息完善"   align="center">
            <template #default="scope">
              {{ scope.row.style_msg===1?"已完善":"待完善" }}
            </template>
        </el-table-column>
        <el-table-column prop="status" label="状态"   align="center"/>
        <el-table-column prop="created_at" label="注册时间"   align="center"/>
        <el-table-column fixed="right" label="操作" align="center" >
            <template #default="scope">
                <el-button  type="primary" size="small" @click="go_user(scope.row.id)">查看</el-button>
                <el-button  type="success" size="small" @click="go_user(scope.row.id)" v-if="scope.row.style_msg!==1">完善</el-button>
            </template>
        </el-table-column>
    </el-table>
</template>
  
<script lang="ts" setup>
import router from "@/router";
import {defineProps} from "vue"
const props = defineProps(["height","list"])
const handleEdit = (index: number, row: User) => {
  console.log(index, row)
}
const go_user = (id: number) => {
 router.push(`/users/${id}`)
}
</script>
<style lang="scss" scoped>
:deep(.cell){
    color:#5e6d82 ;
    font-size: 13px;
}
:deep(thead){
    .cell{
        color:#1f2f3d ;
        font-size: 14px;
        font-weight: 650;
    }
}
:deep(.row_name){
   height: 42px !important;
}
:deep(.el-table__cell){
    padding: 0;
}
</style>
  